package com.zhao.modleclass.fragment;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.LinearLayout;

import com.zhao.modleclass.R;
import com.zhao.modleclass.activity.LoginActivity;
import com.zhao.modleclass.activity.SettingActivity;

/**
 * Created by 张昭 on 2016/11/25.
 */

public class MyPageFragment extends Fragment{
    private Context mContext;
    private LinearLayout ll_liveMyClass,ll_liveSet;
    private ImageView iv_my_head;
    @Override
    public void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        mContext=getActivity();
    }
    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        View view=inflater.inflate(R.layout.fragment_my,container,false);
        return view;
    }

    @Override
    public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
        super.onViewCreated(view, savedInstanceState);
        ll_liveMyClass= (LinearLayout) view.findViewById(R.id.ll_liveMyClass);
        ll_liveSet= (LinearLayout) view.findViewById(R.id.ll_liveSet);
        ll_liveMyClass.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent=new Intent(mContext,LoginActivity.class);
                startActivity(intent);
            }
        });
        ll_liveSet.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent1=new Intent(mContext,SettingActivity.class);
                startActivity(intent1);
            }
        });
        iv_my_head.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {

            }
        });
    }
}
